/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package simulation2;
import java.util.ArrayList;
import simulation2.Dice;

/**
 *
 * @author ec291204
 */
public class FakeDice2 extends Dice
{
    private ArrayList<Integer> listDices;
    private int indice;
    
    public FakeDice2(int[] diceValues)
    {
        indice =0;
        listDices = new ArrayList<Integer>();
        for( int value : diceValues )
        {
            listDices.add(new Integer(value));
        }
    }
    
    @Override
    public int getLastResult() 
    {
        return listDices.get(indice-1);
    }

    @Override
    public int throwDice() {
        
        int result = listDices.get(indice);
        indice++;
        
        return result;
        
    }
    
    
}